package com.birdboot.test;

/**
 * 测试单利模式
 */
public class SingletonDemo {
    public static void main(String[] args) {
//        Singleton s1 = new Singleton();//无法进行实例化
//        Singleton s2 = new Singleton();

        Singleton s1 = Singleton.getInstance();
        Singleton s2 = Singleton.getInstance();

        System.out.println("s1:"+s1);
        System.out.println("s2:"+s2);
    }
}
